package com.intco.ait.quotation.api.infrastructure.mybatis.entity;

import com.alibaba.fastjson2.JSON;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

@Data
@TableName("sku")
public class SkuDo {

    private Long id;

    private String invCode;

    private String name;

    private String productType;

    private String pic;

    private List<Long> bomDetailIds;

    private String status;

    private BigDecimal port;

    private BigDecimal cutting;

    private BigDecimal labor;

    private Date insertTime;

    private Date updateTime;

    public void setBomDetailIds(String bomDetailIds) {
        this.bomDetailIds = JSON.parseArray(bomDetailIds, Long.class);
    }

    public String getBomDetailIds() {
        return JSON.toJSONString(this.bomDetailIds);
    }

}
